import 'package:flutter/material.dart';
import 'package:netstorage/utils/screen_adapter_helper.dart';

// 演示屏幕适配的功能
class ScreenFixPage extends StatefulWidget {
  const ScreenFixPage({super.key});

  @override
  State<ScreenFixPage> createState() => _ScreenFixPageState();
}

class _ScreenFixPageState extends State<ScreenFixPage> {
  @override
  Widget build(BuildContext context) {
    ScreenAdapterHelper.init(context);
    return Scaffold(
      appBar: AppBar(),
      body: Column(
        children: [
          Center(child: Container(
            width: 200,height: 200,decoration: const BoxDecoration(color:Colors.blue),child: const Text('默认大小'),
          )),
          SizedBox(height: 50),
          Center(child: Container(
            width: 200.px,height: 200.px,decoration: const BoxDecoration(color: Colors.amber),child: const Text('适配后的大小'),
          ),)
        ],
      ),
    );
  }
}
